Exponentiate (x ^ y)

Basic and Crystal syntax.

Usage

x ^ y

Raise x to the power of y.

Note:    The Number value y can be fractional, and it can be positive or negative. The Number value x can be fractional, but can be negative only if y is a whole number.

Examples

The following examples are applicable to both Crystal and Basic syntax:

3 ^ 2

Returns 9.

3 ^ .5

Returns 1.73205....

(-3.5) ^ 2

Returns 12.25. Note that the Exponentiation operator has a higher precedence than Negation, so -3.5 ^ 2 is different from (-3.5) ^ 2.

3 ^ (-2)

Returns .111...

Note:    To express a number to a negative power, enclose the power in parentheses.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com